package cn.tedu.plus.bigint_bigdecimal;


import java.math.BigDecimal;
import java.text.NumberFormat;
import java.util.Locale;

public class NumberFormatDemo {
    public static void main(String[] args) {
        double value = 93.27;
        BigDecimal number = BigDecimal.valueOf(value);

        NumberFormat currencyInstance = NumberFormat.getCurrencyInstance(Locale.FRANCE);
        NumberFormat percentInstance = NumberFormat.getPercentInstance();

        String r1 = currencyInstance.format(number);
        String r2 = percentInstance.format(number);

        System.out.println(r1);
        System.out.println(r2);

    }
}
